package kr.hkit.summary_java.erp.dto;

import java.text.DecimalFormat;

public class Employee {
	private int empNo;
	private String empName;
	private int title;
	private int manager;
	private int salary;
	private int deptno;
	private String sTitle;

	public Employee() {

	}

	public Employee(int empNo, String empName, int deptno, String title,
			int manager, int salary) {
		super();
		this.empNo = empNo;
		this.empName = empName;
		this.deptno = deptno;
		this.sTitle = title;
		this.manager = manager;
		this.salary = salary;

	}

	public Employee(int empNo, String empName, int title, int manager,
			int salary, int deptno) {
		super();
		this.empNo = empNo;
		this.empName = empName;
		this.title = title;
		this.manager = manager;
		this.salary = salary;
		this.deptno = deptno;
	}

	public int getEmpNo() {
		return empNo;
	}

	public void setEmpNo(int empNo) {
		this.empNo = empNo;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public int getTitle() {
		return title;
	}

	public void setTitle(int title) {
		this.title = title;
	}

	public int getManager() {
		return manager;
	}

	public void setManager(int manager) {
		this.manager = manager;
	}

	public int getSalary() {
		return salary;
	}

	public void setSalary(int salary) {
		this.salary = salary;
	}

	public int getDeptno() {
		return deptno;
	}

	public void setDeptno(int deptno) {
		this.deptno = deptno;
	}

	@Override
	public String toString() {
		return "Employee [empNo=" + empNo + ", empName=" + empName + ", title="
				+ title + ", manager=" + manager + ", salary=" + salary
				+ ", deptno=" + deptno + "]";
	}

	public String[] toArray() {
		DecimalFormat df = new DecimalFormat("#,###");
		return new String[] { String.valueOf(empNo), empName,
				String.valueOf(deptno), sTitle, String.valueOf(manager),
				df.format(salary) };
	}

	/*
	 * public String titleMethod() { int res = 0; String result = null; res =
	 * title;
	 * 
	 * switch (res) { case 1: result = "사장"; break; case 2: result = "부장";
	 * break; case 3: result = "과장"; break; case 4: result = "대리"; break; case
	 * 5: result = "사원"; break; }
	 * 
	 * return result; }
	 */

}
